#include<bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const int N=2e5+10;
#define INF 0x3f3f3f3f;
typedef long long int ll;
#define close(); std::ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);
//----------------------------------------------------------------------------//
int n, m, k;
int a[N];
void solve()
{
	int b, r; 
    cin >> n >> r >> b;
    int k = r / (b + 1);//先把a分成b+1段
    for (int i = 1; i <= b + 1; i ++) a[i] = k;

    int kk = r % (b + 1);
    for (int i = 1; i <= kk; i ++) a[i]++;//把余下的依次加到前kk个r分组中,每个分组还包括一个b
    for (int i = 1; i <= b + 1; i ++) 
    {
        while (a[i] --) cout << 'R';
        if (i != b + 1) cout << 'B';//一共b+1组,但最后一组没有B
    }

    cout << '\n';



	
}

int main()
{
	close();
	int T; cin>>T;
	while (T--) solve();
	return 0;
}
//连续相同的字符串长度最大值最小
///用b分割r, r分成b+1
//rr b rr b rr b rr b rr b rr b r